package test.my.com.myapplicationtest.banner_view;

import android.app.Activity;
import android.os.Bundle;

import java.util.ArrayList;
import java.util.List;

import test.my.com.myapplicationtest.R;


/**
 * Created by Cooper on 2016/5/5.
 */
public class BannerViewActivity extends Activity {

    private BannerView mBannerView;
    private List<String> imageUrls = new ArrayList<>();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        imageUrls.add("http://img5.imgtn.bdimg.com/it/u=3425851328,2681317699&fm=21&gp=0.jpg");
        imageUrls.add("http://img0.imgtn.bdimg.com/it/u=2804584460,327056668&fm=21&gp=0.jpg");
        imageUrls.add("http://img5.imgtn.bdimg.com/it/u=1849768669,2102852722&fm=21&gp=0.jpg");
        imageUrls.add("http://img5.imgtn.bdimg.com/it/u=992620062,942493679&fm=21&gp=0.jpg");
        setContentView(R.layout.aty_banner_view_activity);
        mBannerView = (BannerView) findViewById(R.id.bannerView);

        mBannerView.setBuilder(new BannerView.Builder().setImageUrls(imageUrls).setIndicationConversionPic(new int[]{R.drawable.dot_focused, R.drawable.dot_normal}));
//        mBannerView.delay_time=10000;
        mBannerView.isHasTimer=true;
        mBannerView.execute();
    }
}
